package FindCharNum;

/**
 * @author Jiang Zhiyan
 *
 * 2021年6月29日 上午9:34:56
 *
 */
public class Counter {
	private char c;
	private int num;
	
	public Counter(char c,int num) {
		this.c= c;
		this.num=num;
	}
	
	@Override
	public int hashCode() {
		return this.c;
	}
	@Override
	public boolean equals(Object obj) {
		if(obj==null) return false;
		if(obj==this) return true;
		if(obj instanceof Counter) {
			Counter other = (Counter) obj;
			return this.c==other.c;
		}
		return false;
	}

	 public String toString() {
		 return c+":" +num;
	 }
	/**
	 * @return the c
	 */
	public char getC() {
		return c;
	}

	/**
	 * @param c the c to set
	 */
	public void setC(char c) {
		this.c = c;
	}

	/**
	 * @return the num
	 */
	public int getNum() {
		return num;
	}

	/**
	 * @param num the num to set
	 */
	public void setNum(int num) {
		this.num = num;
	}
	

}
